package com.mysoft.gfyx.clue.service;

import com.mysoft.framework.modeling.dto.FieldsSetting;
import com.mysoft.framework.modeling.dto.ListDataResult;
import com.mysoft.framework.modeling.dto.LoadDataParams;
import com.mysoft.gfyx.clue.controller.dto.MySubscriptionPageDto;
import com.mysoft.gfyx.clue.controller.dto.Subscription.AddProjectSubscriptionRequestDto;
import com.mysoft.gfyx.clue.controller.dto.Subscription.AddRadarSubscriptionRequestDto;
import com.mysoft.gfyx.clue.controller.dto.Subscription.AddSubscriptionRequestDto;
import com.mysoft.gfyx.clue.controller.dto.Subscription.GetWxQrCodeRequestDto;
import com.mysoft.gfyx.clue.service.dto.QrCodeDataDto;

import java.util.UUID;


public interface SubscriptionService {
    String PERIOD_NEVER = "从不";
    String PERIOD_DAILY = "每天";
    String PERIOD_MONDAY = "周一";
    String PERIOD_TUESDAY = "周二";
    String PERIOD_WEDNESDAY = "周三";
    String PERIOD_THURSDAY = "周四";
    String PERIOD_FRIDAY = "周五";
    String PERIOD_SATURDAY = "周六";
    String PERIOD_SUNDAY = "周日";

    String TYPE_LAND = "拿地信息";
    String TYPE_PROJECT = "开盘项目";

    String SEND_TIME_EIGHT = "08:00";

    UUID ADMIN_GUID = UUID.fromString("4230bc6e-69e6-46a9-a39e-b929a06a84e8");

    enum SubscriptionType {
        CustomerFeed, Subscription, ProjectSubscription, RadarSubscription;
    }

    FieldsSetting loadMySubscriptionFields();

    ListDataResult loadMySubscriptionData(LoadDataParams options);

    ListDataResult loadMySubscriptionDataBySql(LoadDataParams options);

    FieldsSetting loadProjectSubscriptionFields();

    Boolean addSubscription(AddSubscriptionRequestDto dto);

    Boolean addProjectSubscription(AddProjectSubscriptionRequestDto dto);

    Boolean addRadarSubscription(AddRadarSubscriptionRequestDto dto);

    ListDataResult loadProjectSubscriptionData(LoadDataParams options);

    Object getMySubscription(SubscriptionType type);

    boolean applyCron();

    boolean pull();

    boolean isSetAdminSubscription();

    /**
     * 获取我的商机订阅数量
     *
     * @return 根据用户id 获取数量，如果查询为空，默认返回 0
     */
    int getMySubscriptionCount();

    /**
     * 获取我的订阅客户动态
     *
     * @return 通过客户的招标，拿地，开盘数据相加
     */
    int getMySubscriptionNewsCount();

    /**
     * 是否开启商机订阅推送
     *
     * @return false 未开启 true 开启
     */
    boolean isSetSubscriptionConfig();

    /**
     * 获取用户最新的商机数据
     *
     * @return 从数据表获取的商机数据
     */
    MySubscriptionPageDto getLatestOpportunitiesList(Integer page, Integer pageSize);

    QrCodeDataDto getWxQrCode();

    QrCodeDataDto getBindStatus(GetWxQrCodeRequestDto dto);

    String filterProvinceProfit(String area);

    Boolean syncSubscription(SubscriptionType type);
}
